//
//  LXFootprintViewController.m
//  LvXi_newVersion
//
//  Created by 诸葛孔明 on 16/9/7.
//  Copyright © 2016年 SJT. All rights reserved.
//............................................................................................//
//...........................................首页-侧滑-足迹..........................................//
//............................................................................................//

#import "LXFootprintViewController.h"
#import "LXStoreViewCell.h"

static NSString *const LXStoreViewCellID = @"LXStoreViewCell";

@interface LXFootprintViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,weak) UITableView *tableView;

@end

@implementation LXFootprintViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUpTableView];
}

#pragma mark - 设置导航条
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self setUpNavi];
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
}

-(void)setUpNavi{
    [super setUpNavi];
    self.navigationItem.title = @"待付款";
}

#pragma mark - 设置tableView
- (void)setUpTableView
{
    UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 40, ScreenWidth, ScreenHeight) style:UITableViewStyleGrouped];
    tableView.delegate = self;
    tableView.dataSource = self;
    tableView.rowHeight = MineRatio(105);
    [self.view addSubview:tableView];
    self.tableView = tableView;
    
    [self.tableView registerClass:[LXStoreViewCell class] forCellReuseIdentifier:LXStoreViewCellID];
}

#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    LXStoreViewCell *cell = [tableView dequeueReusableCellWithIdentifier:LXStoreViewCellID];
    cell.iconImageView.image = [UIImage imageNamed:@"testImg1"];
    cell.nameLabel.text = @"荆条花蜜280g国际地标产品";
    cell.priceLabel.text = @"¥9.90";
    cell.shoppingBtn.hidden = YES;
    return cell;
}

@end
